/*
 * @Descripttion: 
 * @version: 
 * @Author: 高月飞
 * @Date: 2023-11-17 21:12:36
 * @LastEditors: 高月飞
 * @LastEditTime: 2023-11-25 08:39:25
 */
import type { RouteRecordRaw } from "vue-router";
import { Setting } from '@element-plus/icons-vue';



const routes: RouteRecordRaw[] = [
    //客户管理
    {
        path: '/customer',
        redirect: '/customer/seas',
        component: () => import('@/views/Customer/index.vue'),
        meta: {
            menu: '客户管理',
            icon: "icon-kehuguanli",
        },
        children: [
            //公海客户
            {
                path: '/customer/seas',
                component: () => import('@/views/Customer/Seas/index.vue'),
                meta: {
                    breadcrumbs: [
                        { title: '客户管理' },
                        { title: '管理列表' },
                        { to: '/customer/seas', title: '公海客户' }
                    ],
                    menu: '公海客户',
                    icon: "icon-hetongguanli",
                },
                props: route => {
                    return {
                        page: route.query.page ? Number(route.query.page) : 1,
                        pageSize: route.query.pageSize ? Number(route.query.pageSize) : 10

                    }
                }
            },
            //全部客户
            {
                path: '/customer/all',
                component: () => import('@/views/Customer/All/index.vue'),
                meta: {
                    breadcrumbs: [
                        { title: '客户管理' },
                        { title: '管理列表' },
                        { to: '/customer/all', title: '全部客户' }
                    ],
                    menu: '全部客户',
                    icon: "icon-hetongguanli",
                },
                props: route => {
                    return {
                        page: route.query.page ? Number(route.query.page) : 1,
                        pageSize: route.query.pageSize ? Number(route.query.pageSize) : 10

                    }
                }
            },
            //我的客户
            {
                path: '/customer/mine',
                component: () => import('@/views/Customer/Mine/index.vue'),
                meta: {
                    breadcrumbs: [
                        { title: '客户管理' },
                        { title: '管理列表' },
                        { to: '/contract/mine', title: '我的客户' }
                    ],
                    menu: '我的客户',
                    icon: "icon-hetongguanli",
                },
                props: route => {
                    return {
                        page: route.query.page ? Number(route.query.page) : 1,
                        pageSize: route.query.pageSize ? Number(route.query.pageSize) : 10

                    }
                },
            },
            //下属客户
            {
                path: '/customer/subordinate',
                component: () => import('@/views/Customer/Subordinate/index.vue'),
                meta: {
                    breadcrumbs: [
                        { title: '客户管理' },
                        { title: '管理列表' },
                        { to: '/contract/subordinate', title: '下属客户' }
                    ],
                    menu: '下属客户',
                    icon: "icon-hetongguanli",
                },
                props: route => {
                    return {
                        page: route.query.page ? Number(route.query.page) : 1,
                        pageSize: route.query.pageSize ? Number(route.query.pageSize) : 10

                    }
                }
            },
        ]
    },
];

export default routes;
